package com.lxt.cloud.testconfig;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;
import java.util.Timer;

@RestController
@RefreshScope
public class TestConfigService {
    @Value("${config.info}")
    private String configinfo;

    @GetMapping("/configinfo")
    public String getConfigInfo(){
        LocalTime t=LocalTime.now();
        return configinfo + t;
    }
}
